package designs.models.proxy;

public class TriangleProxy implements Geometry {
	double sideA,sideB,sideC;
	Triangle triangle;
	
	public void setABC(double sideA,double sideB,double sideC) {
		this.sideA = sideA;
		this.sideB = sideB;
		this.sideC = sideC;
	}
	@Override
	public double getArea() {
		if (sideA+sideB > sideC && sideA+sideC>sideB && sideB+sideC > sideA) {
			triangle = new Triangle(sideA, sideB, sideC);
			double area = triangle.getArea();
			return area;
		}
		return -1;
	}

}
